<div class="perfiles form">
<?php	
	echo $this->Form->create('Perfile');
?>
	<fieldset>
 		<legend><?php __('Editar Perfil'); ?></legend>
 		<table>
 			<tr>
 				<?php echo $this->Form->input('id'); ?>
 				<td><?php echo $this->Form->input('cargo');?></td>
 				<td><?php echo $this->Form->input('area');?></td>
 			</tr>
 			<tr>
 				<td><?php 				 
 					echo $this->Form->select('competencias_conductuales', $conductuales, $conductuales_actuales, array('multiple'=>true), false);?>
 				</td>
 				<td><?php
 					echo $this->Form->select('competencias_especificas', $especificas, $especificas_actuales, array('multiple'=>true), false);?>
 				</td>
 			</tr>
 			<tr> 				

 				<td><?php echo $this->Form->input('experiencia_minima', 
 											array('label'=>'Experiencia M&iacute;nima en meses', 
 												  'type'=>'select', 
 												  'options'=>array(0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90)));?></td>
 				<td><?php echo $this->Form->input('experiencia',array('type'=>'textarea','size'=>'30'));?></td>
 			</tr>
 			<tr>
 				<td><?php echo $this->Form->input('conocimientos_especificos');?></td> 				
 				<td><?php echo $this->Form->input('funcion_basica');?></td>
 			</tr> 			
 			<?php $style = ($this->Form->value('Perfile.nivel_estudios')!="Bachiller")?"style='display:block'":"style='display:none'"; ?>
			<tr>
				<td><?php echo $this->Form->input('nivel_estudios', array('id'=>'nivel_estudios'));?></td>
				<td><div id="carreras_div" <?php echo $style;?>>
					<?php echo $this->Form->select('carreras', $carreras, $carreras_actuales, array('id'=>'carreras','type'=>'select','options'=>$carreras,'multiple'=>true), false);?>			
					</div>
				</td>
			</tr>	
 			 			<?php $style = ($this->Form->value('Perfile.nivel_estudios')!="Bachiller")?"style='display:block'":"style='display:none'"; ?>
			<tr>
				<td><?php echo $this->Form->input('nivel_estudios', array('id'=>'nivel_estudios'));?></td>
				<td><div id="carreras_div" <?php echo $style;?>>
					<?php echo $this->Form->select('carreras', $carreras, $carreras_actuales, array('id'=>'carreras','type'=>'select','options'=>$carreras,'multiple'=>true), false);?>
					</div>
				</td>
			</tr>
		</table>	
	</fieldset>

<script>
$(function(){
	$('#nivel_estudios').change(function(){
		if($('#nivel_estudios').val()!='Bachiller'){
			$("#carreras_div").attr("style","display:block");
		}else{
			$("#carreras").val();
			$("#carreras_div").attr("style","display:none");
		}
	});
});
</script>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div class="actions">
	<?php echo $this->Form->menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));?>
</div>